//
//  XLCAudioRecorder.h
//  XLConversationInputView
//
//  Created by ilongge on 2022/8/31.
//

#import <Foundation/Foundation.h>

@interface XLCAudioRecorder : NSObject

@property (nonatomic, copy, readonly) NSString *rootPath;
@property (nonatomic, strong) NSDictionary *recorderParams;
/// 最大语音长度
@property (nonatomic, assign) float maxVoiceDuration;
/// 最小语音长度
@property (nonatomic, assign) float minVoiceDuration;
@property (nonatomic, copy) void(^recordTimeBlock)(float duration);

- (instancetype)initWithRootPath:(NSString *)rootPath;
/// 开始录音
- (BOOL)startRecord;
/// 结束录音
- (NSURL *)stopRecorder;
/// 取消录音
- (BOOL)cancleRecorder;
@end

 
